<template>
    <view>
        <city-select
            :formatName="formatName"
            :activeCity="activeCity"
            :hotCity="hotCity"
            :obtainCitys="obtainCitys"
            :isSearch="true"
            ref="citys"
        ></city-select>
    </view>
</template>

<script>
import citys from './citys.js'
console.log(citys)
import citySelect from '@/components/city-select/city-select.vue'
export default {
    data() {
        return {
            //需要构建索引参数的名称（注意：传递的对象里面必须要有这个名称的参数）
            formatName: 'title',
            //当前城市
            activeCity: {
                id: 1,
                title: '东莞市'
            },
            //热门城市
            hotCity: [
            ],
            //显示的城市数据
            obtainCitys: [
            ]
        }
    },
    components: {
        citySelect
    },
    onLoad() {
        //动态更新数据
        this.obtainCitys = citys
    },
    methods: {
    }
}
</script>

<style></style>